package armserver.server;

import java.text.SimpleDateFormat;

import javax.management.Notification;
import javax.management.NotificationListener;

import org.apache.log4j.Logger;

public class ArmServerControllerListener implements NotificationListener{

	private static final Logger log = Logger.getLogger(ArmServerControllerListener.class);
    private static final String DATEPATTEN = "yyyy-MM-dd HH:mm:ss";
	public void handleNotification(Notification n, Object handback) {
		SimpleDateFormat sdf = new SimpleDateFormat(this.DATEPATTEN);
		log.info(n.getSource()+" "+n.getMessage()+" at "+sdf.format(n.getTimeStamp()));
	}

}
